2f7d2e
@@ -106,8 +106,7 @@
private static void applyConfs(String serverConfStr, JdbcConnectionParams connPa
               + " published by the server.");
         }
         // Set host
-        if ((matcher.group(1).equals("hive.server2.thrift.bind.host"))
-            && (connParams.getHost() == null)) {
+        if (matcher.group(1).equals("hive.server2.thrift.bind.host")) {
           connParams.setHost(matcher.group(2));
         }
         // Set transportMode
@@ -116,7 +115,7 @@
private static void applyConfs(String serverConfStr, JdbcConnectionParams connPa
           connParams.getSessionVars().put(JdbcConnectionParams.TRANSPORT_MODE, matcher.group(2));
         }
         // Set port
-        if ((matcher.group(1).equals("hive.server2.thrift.port")) && !(connParams.getPort() > 0)) {
+        if (matcher.group(1).equals("hive.server2.thrift.port")) {
           connParams.setPort(Integer.parseInt(matcher.group(2)));
         }
         if ((matcher.group(1).equals("hive.server2.thrift.http.port"))
